#define _CRT_SECURE_NO_WARNINGS  1
#include<stdio.h>
void init(int* arr,int n)
{
	int i = 0;
	for (i = 0; i < n;i++)
		*(arr+i) = 0;
}
void print(int* arr, int n)
{
	int i = 0;
	for (i = 0; i < n; i++)
		printf("%d ", arr[i]);
}
void reverse(int* arr, int n)
{
	int left = 0, right = n - 1;
	while (left < right)
	{
		int tmp;
		tmp = arr[left];
		arr[left] = arr[right];
		arr[right] = tmp;
		left++;
		right--;
	}
}
int main()
{
	int arr[10] = { 0,1,2,3,4,5,6,7,8,9 };
	int n = sizeof(arr) / sizeof(arr[0]);
	reverse(arr,n);
	print(arr, n);
	printf("\n");
	init(arr, n);
	print(arr, n);
	return 0;
}